const router = require('koa-router')();
const {catagoryModel} = require('../model/catagory');
// 获取公告
router.get('/catagory', async (ctx, next) => {
    await catagoryModel.getCatagory(ctx);
});
// 增加公告
router.post('/add/catagory', async (ctx, next) => {
    await catagoryModel.addCatagory(ctx);
});
// 删除公告
router.post('/delete/catagory', async (ctx, next) => {
    await catagoryModel.deleteCatagory(ctx);
});
// 编辑公告
router.post('/edit/catagory', async (ctx, next) => {
    await catagoryModel.editCatagory(ctx);
});
module.exports = router;